/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cardarus.operatingsystem.domain;

import java.io.Serializable;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 * This class represents an item in the inventory.
 * @author Nobal and Bryan Hyde
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("IT")
public class Item implements Serializable {

    /**
     * The ID of the item
     */
    @Id
    private int id;
    /**
     * The name of the item
     */
    private String name;
    /**
     * The description of the item
     */
    private String description;
    /**
     * The price of the item
     */
    private double price;
    /**
     * The inventory of the item
     */
    private int inventory;
    private boolean card;
    private boolean specialBox;

//    /**
//     * A list of rows of SalesTransactionRow
//     */
//    private List<Item> rows;
//
    /**
     * Constructor for Customer
     */
    public Item() {
    }

    /**
     * Constructor for Customer
     * @param id 
     * @param name
     * @param description
     * @param price
     * @param inventory
     */
    public Item(int id, String name, String description, double price, int inventory) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.price = price;
        this.inventory = inventory;
  


    }

    /**
     * @return the Id of the Item
     */
    public int getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the description
     */
    public String getName() {
        return name;
    }

    /**
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the price
     */
    public double getPrice() {
        return price;
    }

    /**
     * @param price the price to set
     */
    public void setPrice(double price) {
        this.price = price;
    }

    /**
     * @return the inventory
     */
    public int getInventory() {
        return inventory;
    }

    /**
     * @param inventory the inventory to set
     */
    public void setInventory(int inventory) {
        this.inventory = inventory;
    }

    /**
     * @return the card
     */
    public boolean isCard() {
        return card;
    }

    /**
     * @param card the card to set
     */
    public void setCard(boolean card) {
        this.card = card;
    }

    /**
     * @return the specialBox
     */
    public boolean isSpecialBox() {
        return specialBox;
    }

    /**
     * @param specialBox the specialBox to set
     */
    public void setSpecialBox(boolean specialBox) {
        this.specialBox = specialBox;
    }
//    /**
//     *
//     * @return
//     */
//    public List<Item> getRows() {
//        return rows;
//    }
//
//    /**
//     * adds a SalesTransactionRow in the list of rows.
//     * @param row the SalesTransactionRow to add.
//     */
//    public void addRow(Item row){
//        getRows().add(row);
//    }
}
